package com.cgw.auth.attribute;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * AuthApiAttribute
 *
 * @author grl
 * @date 2024/4/28
 */
@Data
@Component
@ConfigurationProperties(prefix = "authority",ignoreInvalidFields = true)
public class AuthApiAttribute {
    /**
     * 是否需要开启授权
     */
    private Boolean enable = true;
    /**
     * 需要授权的链接
     */
    private List<String> includePath = List.of("/**");
    /**
     * 需要排除的链接
     */
    private List<String> excludePath;
    /**
     * 失效时长（s） 默认一天
     */
    private Long expire = 86400L;
}
